{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy  as np\n",
    "import os\n",
    "import pandas as pd\n",
    "from sklearn.feature_extraction.text import TfidfVectorizer\n",
    "from sklearn.model_selection import cross_val_score\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "def loadEmails2df(paths):\n",
    "    docs, labels = [], []\n",
    "    for path in paths:\n",
    "        file_names = os.listdir(path)\n",
    "        \n",
    "        for file_name in file_names:\n",
    "            txt = open(path+ '/' + file_name,encoding='Latin-1',errors='ignore').read()\n",
    "            docs.append(txt)\n",
    "\n",
    "\n",
    "        if (path.find('ham') != -1):\n",
    "            labels = np.concatenate((labels, [0] * len(file_names)),axis=0)\n",
    "        else:\n",
    "            labels = np.concatenate((labels, [1] * len(file_names)),axis=0)\n",
    "    return pd.DataFrame({\n",
    "        'data': docs,\n",
    "        'target': labels\n",
    "    })"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "spam = os.listdir('email/email/spam')\n",
    "ham = os.listdir('email/email/ham')\n",
    "dataSet = loadEmails2df(['email/email/ham', 'email/email/spam'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Hi Peter,With Jose out of town, do you want tomeet once in a while to keep thingsgoing and do some interesting stuff?Let me knowEugene'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "''.join(np.loadtxt('email/email/ham/1.txt',dtype=str,delimiter='\\\\'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "def loadEmails(paths):\n",
    "    docs, labels = [], []\n",
    "    for path in paths:\n",
    "        file_names = os.listdir(path)\n",
    "        for file_name in file_names:\n",
    "            txt = ''.join(np.loadtxt(path+ '/' + file_name, dtype=str, delimiter='\\\\', encoding='Latin-1').flatten())\n",
    "            doc = txt.split()\n",
    "            docs.append(doc)\n",
    "        if (path.find('ham') != -1):\n",
    "            labels = np.concatenate((labels, [0] * len(file_names)),axis=0)\n",
    "        else:\n",
    "            labels = np.concatenate((labels, [1] * len(file_names)),axis=0)\n",
    "    return docs, labels"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "def textParse(bigString):\n",
    "    listOfTokens = re.split(r'\\W*', bigString)\n",
    "    return [tok.lower() for tok in listOfTokens if len(tok) > 2]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def spamTest():\n",
    "    docList = []\n",
    "    classList = []\n",
    "    fullText = []\n",
    "    for i in range(1,26):\n",
    "        wordList = textParse(open('email/email/spam/%d.txt'% i).read())\n",
    "        docList.append(wordList)\n",
    "        fullText.extend(wordList)\n",
    "        classList.append(1)\n",
    "        wordList = textParse(open('email/email/ham/%d.txt'% i).read())\n",
    "        docList.append(wordList)\n",
    "        fullText.extend(wordList)\n",
    "        classList.append(0)\n",
    "    vocabList = createVocabList(docList)\n",
    "    trainingSet = range(50);\n",
    "    testSet = []\n",
    "    for i in range(10):\n",
    "        randIndex = int(np.random.uniform(0, len(randomIndex)))\n",
    "        testSet.append(trainingSet[randIndex])\n",
    "        del (trainingSet[randIndex])\n",
    "    trainMat=[];trainClasses = []\n",
    "    for docIndex in trainingSet:\n",
    "        trainiMat.append(setOfWords2Vec(vocabList, docList[docIndex]))\n",
    "        trainClasses.append(classList[docIndex])\n",
    "    p0V,p1V,pSpam = trainNB0(np.array(trainMat), np.array(trainClasses))\n",
    "    errorCount = 0\n",
    "    for docIndex in testSet:\n",
    "        wordVector = setOfWords2Vec(vocabList, docList[docIndex])\n",
    "        if classifyNB(np.array(wordVector), p0V, p1V, pSpam)!= classList[docIndex]:\n",
    "            errorCount += 1\n",
    "    print(\"the error rate is:%.3f\"% (float(errorCount) / len(testSet)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "tf = TfidfVectorizer()\n",
    "tf.fit(dataSet['data'])\n",
    "data_tf = tf.transform(dataSet['data'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "17    0.0\n",
       "36    1.0\n",
       "9     0.0\n",
       "42    1.0\n",
       "29    1.0\n",
       "44    1.0\n",
       "22    0.0\n",
       "16    0.0\n",
       "30    1.0\n",
       "21    0.0\n",
       "Name: target, dtype: float64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "Xtrain, Xtest, Ytrain, Ytest = train_test_split(data_tf, dataSet['target'], test_size=0.2)\n",
    "Xtest.shape[0]\n",
    "Ytest"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.0"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.naive_bayes import GaussianNB,MultinomialNB,BernoulliNB\n",
    "mnb = MultinomialNB()\n",
    "mnb.fit(Xtrain,Ytrain) \n",
    "mnb.score(Xtest,Ytest)\n",
    "bnb = BernoulliNB()\n",
    "bnb.fit(Xtrain,Ytrain)\n",
    "bnb.score(Xtest,Ytest)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjUAAAGdCAYAAADqsoKGAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXM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rT01MrV66UJI0ePVrbt2/X559/ftNxBwwYoIsXL2rjxo2OlGtTVFQkX19fFRYWysfH547WAQAAflmO/H47dPrpypUr2rt3r+Lj439YgYuL4uPjtWPHjgqXKS0tldlstmvz9PTUtm3bbJ83bdqkmJgYPfvss6pdu7ZatmypJUuW3LCuLVu2qHbt2mrcuLFeeeUVffvtt46UDwAADMyhUHP+/HmVl5crMDDQrj0wMFD5+fkVLpOQkKAZM2YoOztbFotFmzdv1vr165WXl2frc+LECS1YsEARERH65JNP9Morr+jVV1/V8uXLbX06duyo//7v/1Z6errefvttbd26VZ06dVJ5eXmF45aWlqqoqMhuAgAAxuXwNTWOmjVrlgYOHKjIyEiZTCaFh4crKSlJf/nLX2x9LBaLYmJiNHXqVElSy5YtdfDgQS1cuFD9+/eXJD333HO2/s2bN1eLFi0UHh6uLVu2qEOHDjeMO23aNE2aNOk+bx0AAKgsHDpSU6tWLbm6uqqgoMCuvaCgQEFBQRUuExAQoI0bN6qkpESnTp3SkSNH5O3trQYNGtj6BAcH65FHHrFbrkmTJsrJyblpLQ0aNFCtWrV07NixCuePGTNGhYWFtik3N/d2NxMAADyAHAo17u7uat26tdLT021tFotF6enpatu27S2XNZvNqlOnjq5evap169apa9eutnlxcXHKysqy63/06FGFhYXddH3ffPONvv32WwUHB1c438PDQz4+PnYTAAAwLoefU5OcnKwlS5Zo+fLlOnz4sF555RWVlJQoKSlJktSvXz+NGTPG1j8jI0Pr16/XiRMn9Pnnn6tjx46yWCwaNWqUrc+IESO0c+dOTZ06VceOHdPq1au1ePFi2x1TxcXFev3117Vz5059/fXXSk9PV9euXdWwYUMlJCTc7T4AAAAG4PA1Nb1799a5c+c0fvx45efnKzo6WmlpabaLh3NycuTi8kNWunz5slJSUnTixAl5e3srMTFRK1askJ+fn61PmzZttGHDBo0ZM0apqamqX7++Zs6cqb59+0qSXF1ddeDAAS1fvlwXL15USEiInnrqKU2ePJln1QAAAEl38JyaBxXPqQEA4MFz355TAwAAUFkRagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCEQagAAgCHcUaiZN2+e6tWrJ7PZrNjYWO3ateumfcvKypSamqrw8HCZzWZFRUUpLS3thn6nT5/W888/L39/f3l6eqp58+bas2ePbb7VatX48eMVHBwsT09PxcfHKzs7+07KBwAABuRwqFm7dq2Sk5M1YcIE7du3T1FRUUpISNDZs2cr7J+SkqJFixZpzpw5OnTokAYNGqTu3btr//79tj4XLlxQXFycqlWrpo8//liHDh3S9OnT9dBDD9n6vPPOO5o9e7YWLlyojIwMVa9eXQkJCbp8+fIdbDYAADAak9VqtTqyQGxsrNq0aaO5c+dKkiwWi0JDQzV06FCNHj36hv4hISEaO3asBg8ebGvr2bOnPD09tXLlSknS6NGjtX37dn3++ecVjmm1WhUSEqLXXntNI0eOlCQVFhYqMDBQy5Yt03PPPfezdRcVFcnX11eFhYXy8fFxZJMBAICTOPL77dCRmitXrmjv3r2Kj4//YQUuLoqPj9eOHTsqXKa0tFRms9muzdPTU9u2bbN93rRpk2JiYvTss8+qdu3aatmypZYsWWKbf/LkSeXn59uN6+vrq9jY2FuOW1RUZDcBAADjcijUnD9/XuXl5QoMDLRrDwwMVH5+foXLJCQkaMaMGcrOzpbFYtHmzZu1fv165eXl2fqcOHFCCxYsUEREhD755BO98sorevXVV7V8+XJJsq3bkXGnTZsmX19f2xQaGurIpgIAgAfMfb/7adasWYqIiFBkZKTc3d01ZMgQJSU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VLl6pHjx5avXq1Zs2adUO/Hz+e/3qoun7tyO2qaB2OrLd///769ttvNWvWLIWFhcnDw0Nt27bVlStXHKqjevXqatiwoe3ze++9J19fXy1ZskRTpkzRjh071LdvX02aNEkJCQny9fXVmjVrNH36dNsyP7ffiouL1aVLF7399ts3jB8cHCxXV1dt3rxZX3zxhf7xj39ozpw5Gjt2rDIyMlS/fn2Htud2EWoAoAowmUy3fQrI2TIyMuw+X7+2xNXVVU2aNNHVq1eVkZFhd/opKytLjzzyyE3X+bvf/U7NmjXT/PnzdfXqVfXo0cOhmpo0aaLt27erf//+trbt27ffcsw7sX37ds2fP1+JiYmSpNzcXLsLb++UyWSSi4uL7bTXF198obCwMI0dO9bW58dHca671X5r1aqV1q1bp3r16snNreK/LZPJpLi4OMXFxWn8+PEKCwvThg0blJycfNfbVBFOPwEAKpWcnBwlJycrKytLf/3rXzVnzhwNGzZMkhQREaGuXbtq4MCB2rZtm7788ks9//zzqlOnjrp27XrTdTZp0kSPPfaY3njjDfXp00eenp4O1fT6669r2bJlWrBggbKzszVjxgytX79eI0eOvKtt/amIiAitWLFChw8fVkZGhvr27etwrZJUWlqq/Px85efn6/Dhwxo6dKjtyMr1cXJycrRmzRodP35cs2fPtp1m+rFb7bfBgwfr3//+t/r06aPdu3fr+PHj+uSTT5SUlKTy8nJlZGRo6tSp2rNnj3JycrR+/XqdO3dOTZo0ufMd9DMINQCASqVfv376/vvv9eijj2rw4MEaNmyYXn75Zdv8pUuXqnXr1urcubPatm0rq9Wqjz766Ia3O//USy+9pCtXrtjd1XS7unXrplmzZulPf/qTmjZtqkWLFmnp0qVq3769w+u6lT//+c+6cOGCWrVqpRdeeEGvvvqqateu7fB60tLSFBwcrODgYMXGxmr37t364IMPbPX+53/+p0aMGKEhQ4YoOjpaX3zxhcaNG1fhum6230JCQrR9+3aVl5frqaeeUvPmzTV8+HD5+fnJxcVFPj4++te//qXExEQ1atRIKSkpmj59ujp16uTw9twu7n4CAIO51Z0klV379u0VHR2tm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SohMnTsjb21uJiYlasWKF3UW/33zzjfr06aNvv/1WAQEBevzxx7Vz504FBATY+rz77rtycXFRz549VVpaqoSEBM2fP/8uNh0AABiJw8+peVDxnBoAAB489+05NQAAAJUVoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABgCoQYAABjCHYWaefPmqV69ejKbzYqNjdWuXbtu2resrEypqakKDw+X2WxWVFSU0tLSbtr/D3/4g0wmk4YPH27X3r59e5lMJrtp0KBBd1I+AAAwIIdDzdq1a5WcnKwJEyZo3759ioqKUkJCgs6ePVth/5SUFC1atEhz5szRoUOHNGjQIHXv3l379++/oe/u3bu1aNEitWjRosJ1DRw4UHl5ebbpnXfecbR8AABgUA6HmhkzZmjgwIFKSkrSI488ooULF8rLy0t/+ctfKuy/YsUKvfnmm0pMTFSDBg30yiuvKDExUdOnT7frV1xcrL59+2rJkiV66KGHKlyXl5eXgoKCbJOPj4+j5QMAAINyKNRcuXJFe/fuVXx8/A8rcHFRfHy8duzYUeEypaWlMpvNdm2enp7atm2bXdvgwYP19NNP2637p1atWqVatWqpWbNmGjNmjL777jtHygcAAAbm5kjn8+fPq7y8XIGBgXbtgYGBOnLkSIXLJCQkaMaMGXriiScUHh6u9PR0rV+/XuXl5bY+a9as0b59+7R79+6bjv3b3/5WYWFhCgkJ0YEDB/TGG28oKytL69evr7B/aWmpSktLbZ+Liooc2VQAAPCAcSjU3IlZs2Zp4MCBioyMl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rp2mTp2qXr16adeuXVq8eLEWL17s7NKqpC5duuitt95S3bp11bRpU+3fv18zZszQiy++6OzSqozi4mIdO3bM9vnkyZPKzMxUzZo1VbduXQ0fPlxTpkxRRESE6tevr3HjxikkJMR2h9R9ZUWVJ6nCaenSpc4uDf/fr3/9a+uwYcOcXUaV9fe//93arFkzq4eHhzUyMtK6ePFiZ5dUZRUVFVmHDRtmrVu3rtVsNlsbNGhgHTt2rLW0tNTZpVUZn332WYW/Gf3797darVarxWKxjhs3zhoYGGj18PCwdujQwZqVlfWL1MZzagAAgCFwTQ0AADAEQg0AADAEQg0AADAEQg0AADAEQg0AADAEQg0AADAEQg0AADAEQg0AADAEQg0AADAEQg0AADAEQg0AADAEQg0AADCE/wccZIIhOtX6YQAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "mnbs=[]\n",
    "bnbs=[]\n",
    "for i in range(10):\n",
    "    mnb = MultinomialNB()\n",
    "    mnb_s = cross_val_score(mnb,data_tf,dataSet['target'],cv=15).mean()\n",
    "    mnbs.append(mnb_s)\n",
    "    bnb = BernoulliNB()\n",
    "    bnb_s = cross_val_score(bnb,data_tf,dataSet['target'],cv=15).mean()\n",
    "    bnbs.append(bnb_s)\n",
    "plt.plot(range(1,11),mnbs,label = \"polynomial Bayes\")\n",
    "plt.plot(range(1,11),bnbs,label = \"Bernoulli Bayes\")\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.6"
  },
  "orig_nbformat": 4,
  "vscode": {
   "interpreter": {
    "hash": "d44d76ef8cbbc4331cecfe2e59228ac31ebb71026289858a116838be7168b60b"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
